home *** CD-ROM | disk | FTP | other *** search
- Path: hermes.oc.com!usenet
- From: Larry Weiss <lfw@oc.com>
- Newsgroups: comp.lang.c
- Subject: Re: C Coding Standards
- Date: Fri, 09 Feb 1996 10:03:25 -0600
- Organization: OpenConnect Systems, Dallas, TX, USA
- Message-ID: <311B704D.39ED@oc.com>
- References: <4fd3r1$5ae@LNCSEX0003.eu.btco.com> <larry_kearney-0802961600170001@amaryllisp1.appsig.com>
- NNTP-Posting-Host: ocs2228.oc.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win16; I)
- CC: lfw@oc.com
-
- > > Anyone know where I can get a start on writing some coding standards...
- > > I would like to know what need s to be covered. Right now I can think of
- > >
- > > 1) Identifier naming conventions
- > > 2) Headers - code layout- indentation etc
- > >
- > > Anyone know of an existing standard which one can adopt ?
-
- Here are some topics that we cover in our coding standard at work:
- o module headers (both .c and .h)
- o function declaration header
- o variable names (both global and local)
- o statement typography
- o statement indention
- o expression typography
- o comment (both block and statement level)
- o function prototype policy
- o "Hungarian notation" policy
- o module names
- o component architecture issues
- o variable initialization policy
- o portability issues (type names, memory management isolation, etc.)
- o conditional compilation policy (#if, #ifdef usage)
- o makefile issues (dependency usage, -D switch policy, etc)
- o included file issues (multiple inclusion avoidance policies, etc)
- o Standard C compliance policy
- o max module length policy
- o debugging instrumentation policies (permanence, format, etc)
- o usage of TAB characters (allowed?, policy if allowed)
-